import { Component } from '@angular/core';
import { NavController, NavParams } from 'ionic-angular';
import {HttpServies} from '../../providers/http-servies';

@Component({
  selector: 'page-details',
  templateUrl: 'details.html',
  providers:[HttpServies]
})
export class DetailsPage {


  dataJson:any=[];
  userInfo = {
    'title': '',
    'content': '',
  }
    fulltime = '';
  constructor(public navCtrl: NavController,private http:HttpServies, public navParams: NavParams) {
      this.fulltime = this.navParams.get('category');
  }

  ionViewDidLoad() {
      console.log('ionViewDidLoad ServicePage');
  }


  checkInfo() {
    var param = "title=" + this.userInfo.title
        + "&content=" + this.userInfo.content
            +"&category="+this.fulltime
        + "&status=" +2;
    this.http.httpPost('/home/job/civilian', param)
        .then(res => {
          if (res && res.code == 1) {
              console.log(res.msg);
            this.http.showErro(res.msg);
          }else {
              this.http.showErro(res.msg);
          }
        })
  }


}
